package com.ssy.lingxi.member.merchant.model.constant;

import com.ssy.lingxi.common.language.LanguageHolder;

/**
 * 省市区域匹配规则枚举
 * @author 万宁
 * @version 2.0.0
 * @date 2021-04-12
 */
public enum CountryAreaFilterRuleEnum {
    /**
     * 上级区域要完全包含下级区域 - 0
     */
    FullyInclude(0, "上级区域要完全包含下级区域"),

    /**
     * 上级区域和下级区域只要有交集即可 - 1
     */
    Intersection(1, "上级区域和下级区域只要有交集即可");

    private final Integer code;

    CountryAreaFilterRuleEnum(Integer code, String message) {
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return LanguageHolder.getName(this.getClass(), this.code);
    }
}
